home *** CD-ROM | disk | FTP | other *** search
-
-
-
- VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx)))) VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx))))
-
-
-
- NNNNAAAAMMMMEEEE
- VkSubMenu - A container for pulldown or pull-right menu panes
-
- IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
- VkMenu : VkMenuItem: VkComponent : VkCallbackObject
-
- HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
- #include <Vk/VkSubMenu.h>
-
- PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
- CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
- VkSubMenu(const char *name,
- VkMenuDesc *desc = NULL,
- XtPointer defaultClientData = NULL);
-
- VkSubMenu(Widget parent,
- const char *,
- VkMenuDesc *desc = NULL,
- XtPointer defaultClientData = NULL);
-
- virtual ~VkSubMenu();
-
-
- TTTTeeeeaaaarrrr OOOOffffffff CCCCoooonnnnttttrrrroooollll
- void showTearOff(Boolean showit);
-
-
- AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
- virtual VkMenuItemType menuType ();
- Widget pulldown();
- virtual const char* className();
-
-
- CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The VkSubMenu class supports pulldown menu panes. These menu panes can be
- used within a menu bar (a VkMenuBar object), or as a cascading, pull-
- right menu in a popup or other pulldown menu.
-
-
- MMMMEEEENNNNUUUUSSSS IIIINNNN TTTTHHHHEEEE OOOOVVVVEEEERRRRLLLLAAAAYYYY PPPPLLLLAAAANNNNEEEESSSS
- By default, menus appear in the normal planes. A ViewKit application's
- menus may be explicitly placed in the deepest available overlay planes.
- Doing so prevents menus from causing expose events and disturbing such
- things as complex GL rendering. Doing so may also allow better looking
- menus when they contain things like checkmarks. The current
- implementation is global. For a single application, either all menus go
- in the overlay planes or none of them do. That may be relaxed in a
- future release.
-
- There are three ways to enable menus in the overlay planes:
-
- Call VkMenu::useOverlayMenus(TRUE) in your application. This will
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx)))) VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx))))
-
-
-
- force all menus to be in the overlay planes, with no way to put them
- back in the normal planes without recompiling.
-
- Put the resource string "*useOverlayMenus: True" in your
- application's app-defaults file. This will put menus in the overlay
- planes by default, but allow users to use the normal planes by
- changing their .Xdefaults file.
-
- Ask the user to add the "-useOverlayMenus" command line switch when
- they run your application. This will put menus in the normal planes
- by default, but allow the user to explicitly ask that the overlay
- planes be used.
-
- There are several disadvantages to using the overlay planes, so menus
- should be put there only when the advantages outweigh the disadvantages:
-
- The colormap in the overlay planes may have fewer pixels. On some
- hardware, the deepest overlay only has three color entries. (The
- fourth entry is a transparent pixel.) When there are fewer colors
- available, menus in the overlay planes have a different appearance.
- In that case, if you have items in your pulldown menus other than
- labels (e.g. cascade buttons or toggle buttons), they may not look
- correct in some of the less-common color schemes.
-
- Other applications that are using the overlay planes at the same
- time will display in the wrong colors when a menu appears (i.e.
- colors will flash). This happens because the menu's colormap will
- get installed and replace any previous overlay colormap.
-
- When a pulldown menu in the overlay planes is torn off, 4Dwm puts
- the tear-off in the overlay planes. The title bar of the window
- appears with the wrong colors and, as with (2), the window appears
- with the wrong colors when another application uses the overlay
- planes (e.g. 4Dwm's root-window popup menu).
-
- Running the example program "vkmenu" shows that the expose counter
- increments each time a menubar item is selected and dismissed. Running
- "vkmenu -useOverlayMenus" shows that the expose counter does not change
- when pulldown menus appear and disappear, since no expose events are
- generated. For more information see /_u_s_r/_s_h_a_r_e/_s_r_c/_V_i_e_w_K_i_t/_M_e_n_u_s/_R_E_A_D_M_E.
-
-
- FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
- VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu(((())))
- VkSubMenu(const char *name,
- VkMenuDesc *desc = NULL,
- XtPointer defaultClientData = NULL);
-
- VkSubMenu(Widget parent,
- const char *name,
- VkMenuDesc *desc = NULL,
- XtPointer defaultClientData = NULL);
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx)))) VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx))))
-
-
-
- The VkSubMenu constructor initializes a VkSubMenu object. If the
- second form, which takes a widget as the first argument, is used,
- the widgets used in the menu are built immediately. Otherwise, the
- widgets in the menu are created at some later time. Both forms of
- the constructor support a defaultClientData argument which can be
- used to supply a clientData argument for use with menu items added
- to the pane whose callbacks do not specify clientData. This allows
- menus to be specified statically, while still allowing an instance
- pointer to be used with callbacks. Both forms of the constructor
- also accept an optional array of VkMenuDesc structures that
- statically describe the contents of the menu.
-
- It is seldom necessary to directly create a VkSubMenu object.
- SubMenus can be added to any VkMenuBar, VkPopupMenu, or VkSubMenu by
- calling those classes's addSubmenu() member function. Menu panes can
- also be added to a VkWindow by calling VkWindow::addMenuPane().
-
- ~~~~VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu(((())))
- virtual ~VkSubMenu()
-
-
- Frees all memory allocated by the VkSubMenu class and destroys all
- widgets used by this class. If the VkSubMenu object contains other
- VkMenuItem objects, these objects are deleted.
-
- TTTTeeeeaaaarrrr OOOOffffffff CCCCoooonnnnttttrrrroooollll
- void showTearOff(Boolean showit);
-
-
- This function allows applications to specify whether or not a given
- menu pane has a tear-off control.
-
- mmmmeeeennnnuuuuTTTTyyyyppppeeee(((())))
- virtual VkMenuItemType menuType()
-
-
- Returns VkMenuItem::SUBMENU.
-
- ppppuuuullllllllddddoooowwwwnnnn(((())))
- Widget pulldown()
-
-
- This function provides access to the XmRowColumn widget used to
- implement the pulldown menu pane. The baseWidget() method returns
- the XmCascadeButton widget required by Motif pulldown menus.
-
- ccccllllaaaassssssssNNNNaaaammmmeeee(((())))
- virtual const char *classname()
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx)))) VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx))))
-
-
-
- Returns "VkSubMenu".
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- The following code segment creates a VkPopupMenu object and adds two
- cascading menu panes to the popup menu.
-
-
- VkPopupMenu *popup = new VkPopupMenu("popupMenu");
- VkSubMenu *subMenu1 = popup->addSubmenu("Submenu1");
- VkSubMenu *subMenu2 = popup->addSubmenu("Submenu2");
-
- // add items to submenus here
-
-
- The following code segment is a constructor for a subclass of VkWindow.
- This constructor adds two panes to the VkWindow object's menu bar.
-
-
- MyWindow::MyWindow( const char *name) :
- VkWindow( name)
- {
- Widget label = XmCreateLabel(mainWindowWidget(),
- "menuDemo", NULL, 0);
-
- VkSubMenu *appMenuPane = addMenuPane("Application");
-
- appMenuPane->addAction("Open",
- &MyWindow::openCallback,
- (XtPointer) this);
- appMenuPane->addSeparator();
- appMenuPane->addAction("Quit",
- &MyWindow::quitCallback,
- (XtPointer) this);
-
- // Add a second menu pane
-
- VkSubMenu *editMenuPane = addMenuPane("Edit");
-
- editMenuPane->addAction("copy",
- &MyWindow::copyCallback,
- (XtPointer) this);
- editMenuPane->addAction("cut",
- &MyWindow::cutCallback,
- (XtPointer) this);
- editMenuPane->addAction("paste",
- &MyWindow::pasteCallback,
- (XtPointer) this);
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx)))) VVVVkkkkSSSSuuuubbbbMMMMeeeennnnuuuu((((3333xxxx))))
-
-
-
- IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkMMMMeeeennnnuuuu
- isContainer(), addAction(), addActionWidget(),
- addConfirmFirstAction(), addSeparator(), addLabel(), addToggle(),
- add(), addSubmenu() addRadioSubmenu(), registerSubmenu(),
- findNamedItem(), removeItem(), deactivateItem(), replace(),
- getItemPosition(), operator[](), numItems(),
-
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm
- show(), hide(), manageAll(), setLabel(), setPosition(), activate(),
- deactivate(), remove(), show(), _position, _isBuilt, _sensitive,
- _parentMenu, _label, _isHidden, _unmanagedWidgets,
- _numUnmanagedWidgets,
-
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
- installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
- setDefaultResources(), getResources(), manage(), unmanage(),
- baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
-
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
- callCallbacks(), addCallback(), removeCallback(),
- removeAllCallbacks()
-
-
- KKKKNNNNOOOOWWWWNNNN DDDDEEEERRRRIIIIVVVVEEEEDDDD CCCCLLLLAAAASSSSSSSSEEEESSSS
- VkHelpPane, VkRadioSubMenu,
-
- CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
- VkMenuItem
-
- KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
- VkMenu, VkMenuBar
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- VkMenu, VkMenuItem, VkComponent, VkMenu, VkMenuBar, VkMenuItem
- _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
- _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-